import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopActivityGrouponController } from '../../../controllers';
const uctoominishopActivityGrouponRouter = new Router();
const minishopActivityGrouponController = new uctooMinishopActivityGrouponController();

uctoominishopActivityGrouponRouter.post('/add', requireUser, minishopActivityGrouponController.add);
uctoominishopActivityGrouponRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_activity_groupon'), minishopActivityGrouponController.edit);
uctoominishopActivityGrouponRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_activity_groupon'), minishopActivityGrouponController.delete);

//For getting minishopActivityGroupon with permission control
uctoominishopActivityGrouponRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_activity_groupon'), minishopActivityGrouponController.getSingle);
uctoominishopActivityGrouponRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_activity_groupon'), minishopActivityGrouponController.getMany);
uctoominishopActivityGrouponRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_activity_groupon'), minishopActivityGrouponController.getMany);

//#endregion AutoCreateCode
export default uctoominishopActivityGrouponRouter;
